Differential pulse code modulation (DPCM) compression is a well known method of reducing the number of bits that must be transmitted or the amount of data that must be stored to represent a sequence of data values. DPCM compression is applicable anywhere that a data stream is generated including, but not limited to, audio and image data. It utilizes a procedure by which a prediction of the value is determined based on a repeatable algorithm utilizing prior data values. When the actual data value is received, it is compared to the predicted value. The difference, which ideally is very small, is then stored instead of the actual value. In addition to the difference, some bits must be stored to represent how this difference must be interpreted during the decompression process. DPCM compression and decompression is not loss-less but the data loss is small, depending on how accurate the predicted value for each data element is. For example, if the predicted value exactly matches the actual value for all data elements (which is very rare), then all that must be stored is the fact that there is no difference between the actual and predicted values. No error is introduced when this is the case and the amount of data stored per data element can be quite small. As the difference value increases due to less accurate predicated values, when the difference can not be represented in the allotted number of bits then the difference must be scaled to fit. This means that some of the lower bits of the difference are lost. This results in an error between the original data value and the value generated by the DPCM decompression, but since the DPCM algorithm utilizes the original actual data value in the encoding process for each data value, the error is not cumulative.
In traditional DPCM algorithms, the number of coded bits per data element is predetermined and constant. There are also algorithms that code to an adaptable number of bits.